The present invention relates to an image processing method and apparatus for calculating an outline similarity between an object image and a model image.
As a conventional method of calculating an outline similarity between a silhouette image of an object of an original image and a silhouette image of a model image, methods employing chain codes or Fourier descriptors are known.
According to the outline similarity calculation method employing chain codes, outline or line segment components are followed while quantizing the direction of the outline or line segment components, and the quantized values are recorded as a code. For instance, assuming a case of quantizing an outline in eight directions, a string of numerals including 0 to 7 are obtained as a code. Then, the difference is calculated between the obtained code of an object and that of a model object (hereinafter referred to as an object), thereby determining the similarity.
According to the outline similarity calculation method employing Fourier descriptors, a periodic function representing a curve of the outline is obtained, and Fourier series expansion is performed to obtain coefficients of the Fourier series, which represent characteristics of a closed curve. Then, the difference is calculated between the string of coefficients of the object and that of the model object, thereby determining the similarity.
However, according to the foregoing conventional method employing chain codes, since the similarity is determined based only on the difference of outline directions, all differences are detected even if the difference in the outline shape is quite small. Therefore, not only a long processing time is required, but also it is difficult to determine the similarity of roughly similar images.
Furthermore, according to the foregoing conventional method employing Fourier descriptors, although an approximate similarity can be calculated, it is difficult to determine the similarity of local portions, e.g., presence of corners or the like.
The present invention has been proposed to solve the conventional problems, and has as its object to provide an image processing method and apparatus capable of similarity calculation between a model image and an object image at high speed with high precision.
According to the present invention, the foregoing object is attained by providing an image processing method comprising: an object extraction step of extracting an object image from image data; an outline point extraction step of extracting a predetermined number of outline points from an outline of the object image; a wavelet transformation step of performing wavelet transformation on the outline points; and a similarity calculation step of calculating a similarity between the object image and a predetermined model image based on a wavelet transformation result.
The invention is particularly advantageous since similarity calculation between a model image and an object image can be executed at high speed with high precision.